package chapter2.No2_2_synchronized同步语句块.i静态同步方法与synchronized_class代码块.demo4;

/**
 * *：synchronized(Class) 效果和 静态同步方法一样
 *
 * Created by Administrator on 2016/11/12.
 */
public class Main {

    public static void main(String[] args) {
        ServiceClass asc = new ServiceClass();
        ServiceClass bsc = new ServiceClass();
        ThreadA a = new ThreadA(asc);
        a.setName("a");
        ThreadB b = new ThreadB(bsc);
        b.setName("b");

        a.start();
        b.start();
    }
}
